package com.zzl.bonds.ticket.dto.ticketopen;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import com.zzl.bonds.ticket.dto.KeyValue;
import com.zzl.bonds.ticket.entity.TicketDataEntity;
import com.zzl.bonds.ticket.entity.feign.ContractEntity;
import com.zzl.general.common.utils.DoubleSerialize;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author : spp
 * @date : 2022/2/23 15:00
 */
@Data
@ApidocModel
public class TicketOpenSignDetailDto {

    /**
     * 凭证信息
     */
    @ApidocModelProperty(description = "凭证编号")
    private String ticketNo;
    @ApidocModelProperty(description = "业务编号")
    private String businessNo;
    @ApidocModelProperty(description = "主键 uuid/ 业务流水号")
    private String id;
    @ApidocModelProperty(description = "开票方id")
    private String openEnterpriseId;
    @ApidocModelProperty(description = "开票方企业名称")
    private String openEnterpriseName;
    @JsonSerialize(using = DoubleSerialize.class)
    @ApidocModelProperty(description = "票据金额")
    private Double ticketAmount;


    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApidocModelProperty(description = "开单日期", validate = "yyyy-MM-dd")
    private Date invoiceTime;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApidocModelProperty(description = "到期日期", validate = "yyyy-MM-dd")
    private Date cashTime;

    @ApidocModelProperty(description = "收单方id")
    private String receiveEnterpriseId;
    @ApidocModelProperty(description = "收单方企业名称")
    private String receiveEnterpriseName;
    @ApidocModelProperty(description = "期限")
    private Integer limitDays;
    @ApidocModelProperty(description = "凭证状态")
    private String ticketStatusStr;
    @ApidocModelProperty(description = "备注")
    private String remark;

    /**
     * 发票信息
     */
    @ApidocModelProperty(description = "发票信息")
    List<TicketDataEntity> invoiceList = new ArrayList<>();
    @ApidocModelProperty(description = "凭证信息")
    List<TicketDataEntity> proofList = new ArrayList<>();
    @ApidocModelProperty(description = "凭证信息")
    List<ContractEntity> protocolList = new ArrayList<>();

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "开单时间", validate = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 应收账款
     */
    @ApidocModelProperty(description = "交易合同号")
    private String contractNo;
    @JsonSerialize(using = DoubleSerialize.class)
    @ApidocModelProperty(description = "应收账款金额")
    private Double receivableAmount;

    /**
     * 新增字段
     */
    @ApidocModelProperty(description = "授信使用情况")
    private String creditUseInfo;

    @ApidocModelProperty(description = "剩余兑付天数")
    private String surplusCashingDays;


    private Integer ticketStatus;

    @JsonIgnore
    @ApidocModelProperty(description = "处理状态信息悬浮")
    private String handStatusInfo;

    @JsonIgnore
    @ApidocModelProperty(description = "操作按钮集合")
    private List<KeyValue> operateButton;

    @JsonIgnore
    private Integer approveStatus;


}
